package com.xyd.model.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xyd.model.base.BaseEnitity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Schema(description = "菜单")
@TableName("sys_menu")
@Data
public class SysMenu extends BaseEnitity {
    private static final long serialVersionUID = 1L;
    // 下级集合
    @TableField(exist = false) // 表示非表中字段
    private List<SysMenu> children;
    // 是否选中
    @TableField(exist = false)
    private boolean isSelect;

    @Schema(description = "所属上级")
    @TableField("parent_id")
    private Integer parentId;
    @Schema(description = "名称")
    @TableField("name")
    private String name;
    @Schema(description = "类型(0:目录 1:菜单 2:按钮)")
    @TableField("type")
    private Integer type;
    @Schema(description = "路由地址")
    @TableField("path")
    private String path;
    @Schema(description = "组件路径")
    @TableField("component")
    private String component;
    @Schema(description = "权限标识")
    @TableField("perms")
    private String perms; // 权限标识
    @Schema(description = "图标")
    @TableField("icon")
    private String icon;
    @Schema(description = "排序")
    @TableField("sort_value")
    private Integer sortValue;
    @Schema(description = "状态(1:启用 0:禁用)")
    @TableField("status")
    private Integer status;
}
